import request from '@/utils/request'
import apis from '@/api'

/**
 * login func
 * parameter: {
 *     username: '',
 *     password: '',
 *     remember_me: true,
 *     captcha: '12345'
 * }
 * @param parameter
 * @returns {*}
 */
export function login (data) {
  return request({
    url: apis.Login,
    method: 'post',
    data: data
  })
}

export function getInfo () {
  return request({
    url: apis.GetInfo,
    method: 'get'
  })
}

export function logout () {
  return request({
    url: apis.Logout,
    method: 'get'
  })
}

export function sendSms (phone) {
  return request({
    url: `${apis.SendSms}?phone=${phone}`,
    method: 'get'
  })
}
